<?php
//This is a utility for use in development and setup of your users.  Do not leave this utility in place on the site for production

// We'll be outputting a text file
header('Content-type: text/plain');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="privateKey.txt"');
require_once 'EventLog.php';
require_once 'Database.php';
try {
	throw new Exception('This utility has been disabled for security reasons');
    $db = new Database();
    $db->connect();
    if ($_SERVER["QUERY_STRING"] == 'russ' ||
     $_SERVER["QUERY_STRING"] == 'mcgregor' ||
     $_SERVER["QUERY_STRING"] == 'mohammed' ||
     $_SERVER["QUERY_STRING"] == 'duhon' || $_SERVER["QUERY_STRING"] == 'gabes' ||
     $_SERVER["QUERY_STRING"] == 'raza' || $_SERVER["QUERY_STRING"] == 'wilde' ||
     $_SERVER["QUERY_STRING"] == 'hutchinson') {
        $keys = $db->getKeys($_SERVER["QUERY_STRING"]);
        $privateKey = $keys[0]['privateKey'];
        echo $privateKey;
    }
} catch (Exception $ee) {
    echo 'error';
}
?>
